Skip to content

feat: BLE functionality enhancements, AGP 9.0 upgrade, and codebase modernization #6

Merged
tuuhin merged 4 commits into
mainfrom
feat/ble-and-build-enhancements
May 20, 2026
Merged

feat: BLE functionality enhancements, AGP 9.0 upgrade, and codebase modernization #6
tuuhin merged 4 commits into
mainfrom
feat/ble-and-build-enhancements

Conversation

@tuuhin

@tuuhin tuuhin commented May 20, 2026

Copy link
Copy Markdown
Owner

Summary

This PR merges significant improvements to the Bluetooth Low Energy BLE subsystem, upgrades the build infrastructure to AGP 9.0, and performs critical refactoring's for better maintainability and navigation stability. These changes address technical debt and unlock new capabilities for BLE data transfer.

Key Changes

  • AGP 9.0 Upgrade: Migrated the build system to the latest Android Gradle Plugin.
  • Dependency Updates: Updated core dependencies to ensure compatibility with AGP 9.0 and improved library performance.
  • Architecture: Refactored domain models for immutability and updated GATT connection callback logic
  • Navigation Migration: Migrated navigation arguments from Parcelable to Serializable
  • Documentation: Added AGENTS.md to the root directory to improve onboarding and project understanding for AI agents and developers.

Testing Performed

  • Integration/Smoke Testing: Verified BLE scanning, GATT connection, and data transfer with MTU negotiation on physical test devices.
  • Build: Verified successful clean build and release configuration validation with AGP 9.0.

tuuhin added 4 commits May 18, 2026 23:33
- Upgraded Gradle to 9.5.0, AGP to 9.2.0, and Kotlin to 2.3.21.
- Updated external libraries and included min , target and compile sdk into `libs.version.toml`
- Removed project-specific res declarations from build.gradle.kts and used a debug string file
Updated `BluetoothClientConnectArgs` and `BluetoothDeviceArgs` to use `@Serializable` instead of `@Parcelize` and removed `Parcelable` implementation. .

Added `/.junie` to `.gitignore`, and some .idea files are updated/added
…tion logic for Android 17.

-`BLEServiceModel`, `BLECharacteristicsModel`, and `BluetoothMessage` to use immutable properties within their primary constructors, removing manual backing fields and `apply` blocks.
-  Updated `AndroidBLEClientConnector` to use `BluetoothGattConnectionSettings` and a dedicated executor when connecting to GATT on supported API levels, this is not being tested on an Android 17 device
- Refactored `BLEClientGattCallback` to accept a `CoroutineScope` via constructor injection, improving lifecycle control from the connector.
- Updated `AndroidBluetoothLEScanner` to only trigger `StateFlow` updates when a device's RSSI actually changes, reducing redundant UI recompositions.
- Included domain model packages to `stability_config.conf` to ensure proper smart recomposition.
- Suppressed relevant deprecation warnings for legacy Bluetooth APIs and improved error handling for `CancellationException` in coroutines.
- Include an AGENTS.md to provide a high-level architectural overview and development guidelines for AI assistants for future.
- Updated versionCode to 6 and versionName to 1.2.2 in build.gradle.kts.
- Removed the kotlin-parcelize plugin and simplified R8 and resource shrinking configurations in gradle.properties and build.gradle.kts.
@tuuhin tuuhin merged commit f8b7cb7 into main May 20, 2026
1 check passed
@tuuhin tuuhin deleted the feat/ble-and-build-enhancements branch May 20, 2026 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant